package com.sicaolong.controller;

import com.sicaolong.model.req.SclRequest;
import com.sicaolong.model.rsp.AdResponse;
import com.sicaolong.service.QueryAdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdController {

    @Autowired
    private QueryAdService queryAdService;

    @PostMapping("/query/v1/scl_doc/")
    public AdResponse queryDocByDocId(SclRequest sclRequest) {
        return queryAdService.queryAd(sclRequest);
    }

    @PostMapping("/query/v2/scl_doc/")
    public AdResponse queryDocByDocIdV2(SclRequest sclRequest) {
        return queryAdService.queryAdV2(sclRequest);
    }
}
